package com.example.midushop.service.category.impl;

import com.example.midushop.entity.category.CategoryOne;
import com.example.midushop.mapper.category.CategoryOneMapper;
import com.example.midushop.service.category.CategoryOntService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 一级分类信息服务接口实现类
 */
@Service
public class CategoryOntServiceImpl implements CategoryOntService {
    @Autowired
    CategoryOneMapper categoryOneMapper;

    /**
     * 根据编号查询一级分类信息，若不传编号则查询所有数据
     * @param CategoryOne_id
     * @return
     */
    @Override
    public List<CategoryOne> findCategoryOneAll(long CategoryOne_id,String CategoryOne_name) {
        return categoryOneMapper.findCategoryOneAll(CategoryOne_id,CategoryOne_name);
    }
}
